#include <iostream>
#include <fstream>
#include <unistd.h>
using namespace std;

int main()
{
	ofstream fout;
	fout.open("/tmp/tmp.txt");

	fork();
	
	for(int i=0;i<10000000; i++){
		fout << "进程" << getpid() << "正在写入数据" << endl;
	}

	fout.close();
}
